package com.steven.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDayBetween {
	public static void main(String[] args) {
		
		
		SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
		 
		Date begindate = null;
		 
		Date enddate = null;
		 
		Long day = null;
		 
		try {
		 
		      String revise_period_begin="2011-03-16";
			begindate = myFormatter.parse(revise_period_begin);
		 
		      String revise_period_end="2012-04-05";
			enddate= myFormatter.parse(revise_period_end);
		 
		      day = (enddate.getTime()-begindate.getTime())/(24*60*60*1000);
		      System.out.println(day);
		 
		} 

		catch (ParseException e1) {
		 



		      e1.printStackTrace();
		 
		}


		
	}

}
